public class MyRunnable implements Runnable {
 
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName() + "-" + this.hashCode() +  ":run");
    }
     
    @Override
    protected void finalize() throws Throwable {
        super.finalize();
        System.err.println(Thread.currentThread().getName() + "-" + this.hashCode() +  ":finalize");
    }
}